{
 "cells": [
  {
   "cell_type": "markdown",
   "source": [
    "## Process类\n",
    "在multiprocessing中，通过创建一个Process对象然后调用它的start()方法来生成进程"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "outputs": [],
   "source": [
    "from multiprocessing import Process\n",
    "\n",
    "def func(name):\n",
    "    print('hello ', name)\n",
    "\n",
    "if __name__ == '__main__':\n",
    "    p = Process(target=func, args=('bob',))\n",
    "    p.start()\n",
    "    p.join()\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}